<extend name="Extends/base" />
<block name="title">用户明细</block>
<block name="css">
</block>
<block name="body_style">class="bgc-fff"</block>
<block name="body">
    <div class="pt30 plr20">
        <div class="c-row c-split">
            <div class="c-50">
                <div class="p20 c-border-r">
                    <form id="editForm">
                        <div class="form-layout form-horizontal form-horizontal-narrow">
                            <div class="control-group">
                                <label class="control-label">
                                    <h3>用户明细</h3>
                                </label>
                            </div>
                            <div class="control-group">
                                <label class="control-label">
                                    <sub class="control-sub">*</sub> 手机号：
                                </label>
                                <div class="control-form">
                                    <input type="text" class="input-text" value="{$userInfo.phone}" disabled>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">
                                    <sub class="control-sub">*</sub> 姓名：
                                </label>
                                <div class="control-form">
                                    <input type="text" class="input-text" value="{$userInfo.name}" disabled>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div class="c-50">
                <div class="p20">
                    <form id="editPwdForm">
                        <div class="form-layout form-horizontal form-horizontal-narrow">
                            <div class="control-group">
                                <label class="control-label">
                                    <h3>修改密码</h3>
                                </label>
                            </div>
                            <div class="control-group">
                                <label class="control-label">
                                    <sub class="control-sub">*</sub> 原密码：
                                </label>
                                <div class="control-form">
                                    <input type="password" class="input-text" name="oldpwd">
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">
                                    <sub class="control-sub">*</sub> 新密码：
                                </label>
                                <div class="control-form">
                                    <input type="password" class="input-text" name="pwd">
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">
                                    <sub class="control-sub">*</sub> 重复密码：
                                </label>
                                <div class="control-form">
                                    <input type="password" class="input-text" name="repwd">
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label"></label>
                                <div class="control-form">
                                    <a href="javascript:;" class="edit-pwd-btn c-btn c-btn-green mr10">确定编辑</a>
                                    <a href="javascript:location.reload();" class="c-btn c-btn-white">取消</a>
                                </div>
                            </div>

                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</block>
<block name="js">

    <script type="text/javascript" src="__WOR__/js/api.js?v={:C('JS_CSS_VERSION')}"></script>
    <script type="text/javascript" src="__WOR__/js/ucent.api.js?v={:C('JS_CSS_VERSION')}"></script>

    <script type="text/javascript">
        /**
         * 修改密码
         */
        $(document).on("click", ".edit-pwd-btn", function () {
            var data = getFormData($("#editPwdForm"));
            if (!data.pwd || !data.repwd) {
                $.toast("请输入密码");
                return false;
            }
            doEdit(data, function (res) {
                if (res.Code != 10000) {
                    $.toast(res.Message);
                    return false;
                }
                $.toast("修改成功", 1500, function () {
                    parent.$(".loginout", window.parent.document).trigger("click");
                });
            })
        });
    </script>
</block>